<!DOCTYPE html>
   <head>
     <script type="text/javascript">
	    function resizeWindow(width, height){
		  window.resizeTo(width, height);
		  
		}
	 </script>
   </head>
   <body style="background-color: green">
     <input type="button" onclick="resizeWindow(400,300)" value="Zoom out"/>
   </body>
</html>